<?php
$Scontent = $_POST['search'];
$link = mysqli_connect("localhost","root","root","2113");

$sql = "SELECT * FROM list WHERE name LIKE '%$Scontent%'";

$res =  mysqli_query($link,$sql); 
// 执行结果集获取数据
$arr = [];
while($one=mysqli_fetch_assoc($res)){
	$arr[] = $one;
}
// echo "<pre>";
// print_r($arr);
// echo "</pre>";
// die;
echo  json_encode($arr);